package com.water.controller;

import com.water.entity.RdVolume;
import com.water.service.RdVolumeService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * (RdVolume)表控制层
 *
 * @author 小博
 * @since 2020-12-15 10:03:48
 */
@Controller
@RequestMapping("rdvolume")
public class RdVolumeController {
    /**
     * 服务对象
     */
    @Resource
    private RdVolumeService rdVolumeService;

    /**
     * 跳到表册管理
     * @return
     */
    @RequestMapping("/rd_volume")
    public String rdVolume(){
        return "rd/rd_volume";
    }

    @RequestMapping("/rd_volume_1")
    public String rd_volume_1(){
        return "rd/rd_volume_1";
    }


    /**
     * 进入添加
     * @return
     */
    @RequestMapping("/rd_volume_add")
    public String rdvolume_add(){
        return "rd/rd_volume_add";
    }

    /**
     * 添加表册
     * @param rdVolume
     * @return
     */
    @RequestMapping(value = "/insertAdd",method = RequestMethod.POST)
    public String insertAdd(RdVolume rdVolume){
        System.out.println(rdVolume.toString()+"==================================");
        System.out.println("进入了controller");
        RdVolume rdVolume1 = rdVolumeService.insert(rdVolume);
        System.out.println(rdVolume1);
        return "rd/rd_Volume";
    }



}